<template>
  <div class="photos-container">
    <div class="photoBox" v-for="item in 10" :key="item">
      <p class="fixed">
        <span>编程式跳转页面</span>
        <mt-button type="danger" @click="targetBlank(item)">点击跳转</mt-button >
      </p>
    </div>
  </div>
</template>

<script>
// import router from  'vue-router'
export default {
  data() {
    return {

    };
  },
  methods:{
    targetBlank(params){
      // router.push({
      //   name:'target',
      //   params:{
      //     id:params
      //   }
      // })
      // this.$router.push('/home/photolist/' + params)
      this.$router.push({name:"target", params:{ id:params,gender:'nan' }})


    }
  }
};
</script>

<style lang="scss">
.photos-container {
  .photoBox {
    height: 40px;
    width: 100%;
    .fixed {
      font-size: 15px;
      display: flex;
      justify-content: space-between;
    }
  }
}
</style>